﻿using System;

namespace Database.Sql.Attributes
{
  /// <summary>
  /// Defines property/column mapping to a table valued parameter.
  /// </summary>
  [AttributeUsage(AttributeTargets.Property)]
  public class TVPColumnName : Attribute
  {
    /// <summary>
    /// Gets the name of the column.
    /// </summary>
    /// <value>The name of the column.</value>
    public string ColumnName { get; private set; }

    /// <summary>
    /// Initializes a new instance of the <see cref="TVPColumnName"/> class.
    /// </summary>
    public TVPColumnName()
    { }

    /// <summary>
    /// Initializes a new instance of the <see cref="TVPColumnName"/> class.
    /// </summary>
    /// <param name="columnName">Name of the column.</param>
    public TVPColumnName(string columnName)
    {
      ColumnName = columnName;
    }
  }
}